package com.itheima.a01interfacedemo1;

public class Test {
    public static void main(String[] args) {
        Rabbit r = new Rabbit("xiaobai",2);
        System.out.println(r.getName()+", "+ r.getAge());
        r.eat();
      

        Dog d = new Dog("xiaohei",1);
        System.out.println(d.getName()+", "+ d.getAge());
        d.eat();
        d.swim();

    }
}
